module.exports = {
  start: function (ws) {
    setInterval(function () {
      ws.send(JSON.stringify({type: 'ping'}));
    }, 1000);
  },
  message: function (req, ws) {
    if (req.type === 'ping') {
      ws.send(JSON.stringify({type: 'pong'}));
    }
  }
}
